<?php 
/**
 * ... ...
 * ... ...
 *
 */ 


JCAT_Package::ImportClass('JCAT_Controller',JCAT::PACKAGE_MVC) ;

/**
 * 控制器类 StartWindow 
 *
 * @access public
 */
class StartWindow 
	extends JCAT_Controller 
{

	/**
	 * 构造函数 
	 * 
	 * @access	public
	 * @param	$aParent	JCAT_IController	父控制器 
	 * @return	void
	 */
	public function StartWindow(JCAT_IController $aParent=null )
	{
		// 调用父类构造函数
		$this->JCAT_Controller(__CLASS__,$aParent) ;
		
		// 初始化文档、视图、子控制器 
		$this->Initialize() ;
		
	 	// 读取预设路径
	 	$sPath = file_get_contents(ROOT_PATH.'Data/LastCodePath.dat') ;
	 	if(is_dir($sPath))
	 	{
	 		JCAT_GtkFSDialog::SetGlabalDefaultDirectory($sPath) ;
	 	}
	}

	/**
	 *
	 * @access	public
	 * @return	void
	 */
	public function __destruct()
	{
	 	// 保存为路径
	 	file_put_contents(ROOT_PATH.'Data/LastCodePath.dat',JCAT_GtkFSDialog::GetGlabalDefaultDirectory()) ;
	}
	
	/**
	 * 初始化文档、视图、子控制器 
	 * 
	 * @access	protected
	 * @return	void
	 */
	protected function Initialize()
	{
		//<<[UnmodifiableBlock.Start]::Message Queue::>>//
		// 消息队列
		$aMessageQueue = new JCAT_MessageQueue() ;
		JCAT_MessageDispatcher::RegisterMessageQueue($aMessageQueue,'MSGMVC') ;
		JCAT_MessageDispatcher::RegisterMessageQueue($aMessageQueue,'MSGMVC_OK') ;
		JCAT_MessageDispatcher::RegisterMessageQueue($aMessageQueue,'MSGMVC_BAD') ;
		JCAT_MessageDispatcher::RegisterMessageQueue($aMessageQueue,'MSGMVC_DEBUG') ;
		JCAT_MessageDispatcher::RegisterMessageQueue($aMessageQueue,'') ;
		JCAT_MessageDispatcher::RegisterMessageQueue($aMessageQueue,'') ;
		$this->SetMessageQueue($aMessageQueue) ;
		//<<[UnmodifiableBlock.End]::Message Queue::>>// 
		
		
		$sHere = JCAT_Global::TidyPath( dirname(__FILE__) ) ;
		
		//<<[UnmodifiableBlock.Start]::Initialize Children::>>//
		// 创建并加载视图：StartWindowView
		JCAT_Package::ImportClass('StartWindowView',$sHere.'class.StartWindowView.php');
		$aView = new StartWindowView($this) ;
		$this->AddView($aView) ;
		//<<[UnmodifiableBlock.End]::Initialize Children::>>// 

		//<<[UnmodifiableBlock.Start]::Register Children Global Name::>>//

		//<<[UnmodifiableBlock.End]::Register Children Global Name::>>// 
		
		//<<[UnmodifiableBlock.Start]::Set Document To View::>>//

		//<<[UnmodifiableBlock.End]::Set Document To View::>>// 
		

		// 在此添加代码 
		// TODO ... ... 
	}

	
	/**
	 * 执行入口函数 
	 * 
	 * @access	public
	 * @param	$arrArg=array	array	参数 
	 * @return	void
	 */
	public function MainRun(array $arrArg=array())
	{
		//<<[UnmodifiableBlock.Start]::Main Run::>>//
		// 显示视图 StartWindowView
		$aView = $this->GetView('StartWindowView') ;
		JCAT_ASSERT::ASSERT_INSTANCE($aView,'JCAT_IView',JCAT_Language::Sentence('名为 %s 的视图未定义','StartWindowView')) ;
		$aView->ShowView() ;
		//<<[UnmodifiableBlock.End]::Main Run::>>// 

		// TODO
		// ... ...
		
		Gtk::main() ;
	}

}

?><?
/**
 * [注意!!]
 *	以下内容由 JCAT PHP Toolbox 自动维护，手动更改的内容会被 JCAT PHP Toolbox 抹除，
 *	同时还可能破坏格式，导致 JCAT PHP Toolbox 无法正常读取。
 */
/*<<[UnmodifiableBlock.Start]::Coder Dialog Data::>>&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&//
<<{{DocumentClass:ControllerDoc}}>>
eCVEQSU4RFMlQzFuJURCRiUxNCVCQyUxNyVFOCUzRiUyNCVGQyU4MCU4OCU5NCVD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